package com.company.management.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import com.company.management.service.DepartMentService;
import com.company.management.utils.JsonData;
import com.company.management.utils.ResultCode;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "部门模块",value = "部门 DepartMentController")
@RestController
@RequestMapping("api/department")
@Slf4j
public class DepartMentController {
        @Resource
        private DepartMentService departMentService;
        @ApiOperation("获取所有职位")
        @PostMapping("/listAll")
        public JsonData listAll(){
            return JsonData.buildWithData(ResultCode.SUCCESS, departMentService.listAll());
        }
}
